<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8" />
		<title>个人中心</title>
		<link rel="stylesheet" th:href="@{/static/before/css/style.css}" />
		<script src="../../static/before/js/jquery-3.4.1.min.js"></script>
		<link rel="stylesheet" href="../../static/before/css/button.css">
	</head>
	<body>
		<!--header-->
		<div th:insert="before/header :: header"></div>
		<div th:insert="before/header02 :: header02"></div>
<!-- self_info -->
	<div class="grzxbj">
		<div class="selfinfo center">
		<div class="lfnav fl">
			<div class="ddzx">个人中心</div>
			<div class="subddzx">
				<ul>
					<li><a th:href="@{/myorder}" >我的订单</a></li>
					<li><a href="self_info.html" style="color:#ff6700;font-weight:bold;">我的个人中心</a></li>
					<li><a href="lerts.html">消息通知</a></li>
					<!--<li><a href="">优惠券</a></li>-->
					<li><a href="user-address.html"  >收货地址</a></li>
					<li><a th:href="@{/pwd-change}"  >修改密码</a></li>
				</ul>
			</div>
		</div>

		<div class="rtcont fr"  >
			<!--<from th:action="@{sava_self}" method="post" enctype="multipart/form-data" class="from_save">
			<div class="ddzxbt"><strong>我的资料</strong></div>
			<div class="subgrzl ml40"><span>手机号</span><input  th:value="${session.user.phone}"  id="rephone" name="tel" readonly/>&lt;!&ndash;<span><button id="names"  class="button white">编辑</button></span>&ndash;&gt;</div>
			<div class="subgrzl ml40" ><span >名称</span><input th:value="${session.user.othername}" id="rename" name='username'/><span>&lt;!&ndash;<button id="namePaly"  class="button white">编辑</button>&ndash;&gt;</span></div>
			<div class="subgrzl ml40"><span >密码</span><input  th:value="${session.user.password}"  name="sign"/>&lt;!&ndash;<span><a href="/pwd" type="button" class="button white">修改</a></span>&ndash;&gt;</div>
			<div class="subgrzl ml40"><span >个性签名</span><input  th:value="${session.user.sign}" id="resign" name='sign'/>&lt;!&ndash;<span><button id="signPaly" class="button white">编辑</button></span>&ndash;&gt;</div>
			<div class="subgrzl ml40"><span >我的爱好</span><input  th:value="${session.user.favor}" id="refavor" name="favor"/>&lt;!&ndash;<span><button id="favorPaly"  class="button white">编辑</button></span>&ndash;&gt;</div>
			<button   type="submit" class=" button orange" style="display:block;margin:0 auto">保存</button>

			</from>-->
			<form id="adress_from" action="/sava_self" method="post">
				<div class="ddzxbt"><strong>我的资料</strong></div>
				<!--<div class="ddzxbt"><strong>我的地址</strong><a th:href="@{user-address_2}" id="address">添加收货地址</a></div>-->
				<div class="ddzxbt" type="hidden"><span>用户id&nbsp;&nbsp;&nbsp;&nbsp;：</span><input name="userid" th:value="${user.userid}" class="input02" readonly ></div>
				<div class="ddzxbt"><span>手机号码：</span><input name="phone" th:value="${user.phone}" class="input02" readonly></div>
				<div class="ddzxbt"><span>名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：</span><input name="othername" th:value="${user.othername}" class="input02" ></div>
				<div class="ddzxbt"><span>邮箱地址：</span><input name="email" th:value="${user.email}" class="input02" readonly></div>
				<div class="ddzxbt"><span>个性签名：</span><input name="sign" th:value="${user.sign}" class="input02" ></div>
				<div class="ddzxbt"><span>我的爱好：</span><input name="favor" th:value="${user.favor}" class="input02" ></div>
				<div style="display:block;margin:0 auto">
				<button  id="button1" type="submit" class=" button orange" style="display:block;margin:0 auto">修改</button><span th:text="${text}" style="color: green" readonly/></div>
			</form>
			<div>
		<div class="clear"></div>
		</div>
	</div>
		<div class="clear "></div>
		<div style="position: relative;top: 50px" th:insert="before/footer :: footer"></div>
	</body>
	<script type="text/javascript">
   /*     $(document).ready(function () {
            $("#namePaly").click(function () {
                $("#rename").focus()
        })
		})
*/
    /*    // 此函数功能是新建一个input元素替换div
        //当input元素失去焦点时又变回原来的div
        toReplace = function(divElement) {
            // 创建一个input元素
            var inputElement = document.createElement("input");
            // 把obj里面的元素以及文本内容赋值给新建的inputElement
            inputElement.value = divElement.innerHTML;

            // 用新建的inputElement代替原来的oldDivElement元素
            divElement.parentNode.replaceChild(inputElement, divElement);
            // 当inputElement失去焦点时触发下面函数，使得input变成div
            inputElement.onblur = function() {
                //把input的值交给原来的div
                divElement.innerHTML = inputElement.value;
                //用原来的div重新替换inputElement
                inputElement.parentNode.replaceChild(divElement, inputElement);
            }*/
	</script>
  <!-- &lt;!&ndash; 修改名字&ndash;&gt;
	<script type="text/javascript">
        document.getElementById("namePaly").onclick=function(){
            var text=document.getElementById("rename");
            var val=text.innerHTML;
            text.innerHTML="<input type='text' name='username' id='names' value="+val+" />";
            document.getElementById("n").addEventListener("blur",function(e){
                text.innerHTML=document.getElementById("n").value;
            });
        };
        &lt;!&ndash; 修改手机号&ndash;&gt;
        document.getElementById("phonePaly").onclick=function(){
           /* var text=document.getElementById("rephone");
            var val=text.innerHTML;
            text.innerHTML="<input type='text' name='tel' id='phones' value="+val+" />";
            document.getElementById("n").addEventListener("blur",function(e){
                text.innerHTML=document.getElementById("n").value;
            });*/

        };
        &lt;!&ndash; 个性签名密码&ndash;&gt;
        document.getElementById("signPaly").onclick=function(){
            var text=document.getElementById("resign");
            var val=text.innerHTML;
            text.innerHTML="<input type='text'name='sign' id='signes' value="+val+" />";
            document.getElementById("n").addEventListener("blur",function(e){
                text.innerHTML=document.getElementById("n").value;
            });
        };
        &lt;!&ndash; 爱好&ndash;&gt;
        document.getElementById("favorPaly").onclick=function(){
            var text=document.getElementById("refavor");
            var val=text.innerHTML;
            text.innerHTML="<input type='text'name='favor' id='facores' value="+val+" />";
            document.getElementById("n").addEventListener("blur",function(e){
                text.innerHTML=document.getElementById("n").value;
            });
        };
	</script>-->
	<script type="text/javascript">
	<!-- 保存-->
/*	$(document).ready(function () {
	$("#a").click(function () {
	/!*  $.ajax({
	"url":"/self_info",
	"type":"post",
	"data":"phone="+phone,
	"dataType" : "json",
	"success":function(data){
	if(data.error==false){
	alert("保存成功！！！")


	}else{
	alert("保存成功！！！")

	}

	}
	});*!/
	})
	})*/
	</script>
</html>